package day9.pack2;

public class A {
    public String name = "AAAAAAAAAAAA";
    public void method1() {
        System.out.println("执行了A类的method1方法，名字为" + name);
        method2();
    }
    public void method2() {
        System.out.println("A method2");
    }
}
class B extends A {
    public String name = "BBBBBBBBBBBB";
    public void method2() {
        System.out.println("B method2");
    }
}
